package agenda;

import java.util.TimerTask;


public class TimerTaskExtension extends TimerTask {

	private Agenda<Meeting> agenda1;
	private Agenda<Meeting> agenda2;
	
	public TimerTaskExtension(Agenda<Meeting> agenda1, Agenda<Meeting> agenda2){
		this.agenda1 = agenda1;
		this.agenda2 = agenda2;
	}

	@Override
	public void run() {
		Meeting meeting = new Meeting(15, agenda1, agenda2, "Random meeting", 12, 14);
		if(!agenda1.hasAsEntry(meeting) || !agenda2.hasAsEntry(meeting)){
			System.out.println("ERROR!");
		}
	}
}
